﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Hxsoft.AppV1.Module;

namespace Hxsoft.AppV1.WebUI
{
	/// <summary>
	/// 调查摘要分页列表。
	/// </summary>
	public class VoteSummaryPagingList : VotePagingList
	{
		/// <summary>
		/// 摘要内容。
		/// </summary>
		public virtual string ItemSummary
		{
			get { return Eval("Summary", null); }
		}

		/// <summary>
		/// 调查项。
		/// </summary>
		public virtual string ItemVoteItems
		{
			get { return Eval("VoteItems", null); }
		}




		public override object GetListData()
		{
			PaginationInfo<List<Votes.VoteForSummaryList>> pageInfo = Votes.GetPaginationSummaryList(ClassId, Keyword, CtrPager.PageSize, CurrentPage);
			CtrPager.RecordCount = pageInfo.RecordCount;
			CtrPager.CustomInfoHTML = GenericHelper.GetPagerCustomInfoHtml<List<Votes.VoteForSummaryList>>(pageInfo);
			return pageInfo.Records;
		}
	}
}